home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / ae / code / ax3.00 / bulletins.c < prev    next >
Encoding:
C/C++ Source or Header  |  1980-01-03  |  1.2 KB  |  53 lines

  1. #include "bbs.h"
  2.  
  3. int Bulletins(void)
  4. {
  5.  int stat,stat2,bflag2;
  6.  char str[81];
  7.  BPTR fh;
  8.  
  9.  gnsflag=0;
  10.  bflag2=0;
  11.  
  12.  strcpy(str,Screen_Location);
  13.  strcat(str,"Bulletins/BullHelp.txt");
  14.  if(!(fh=Open(str,MODE_OLDFILE))) {
  15.      MyError(12); // AEPutStr("\r\nNo bulletins are available in this conference!\r\n\r\n");
  16.      return(SUCCESS);
  17.  }
  18.  Close(fh);
  19.  
  20.  stat2=CommandSplit();
  21.  if(stat2>1) {
  22.      sscanf(Command[1],"%d",&stat);
  23.      if(stat2==3)        gnsflag=CheckForNS(Command[2]);
  24.  } else {
  25. HelpAgain:
  26.      bflag2=1;
  27.      strcpy(GSTR1,Screen_Location);
  28.      strcat(GSTR1,"Bulletins/BullHelp");
  29.      ChecktoDisplay(GSTR1,GSTR3,0,0);
  30. InputAgain:
  31.      sprintf(str,"Which Bulletin (?)=List, (Enter)=none? ");
  32.      AEPutStr(str);
  33.      stat2=LineInput("",str,8,KEYBOARD_TIMEOUT);
  34.      if(stat2<0)  return(stat2);
  35.      if(str[0]=='\0') {
  36.          AEPutStr("\r\n");
  37.          return(SUCCESS);
  38.      }
  39.      if(str[0]=='?')     goto HelpAgain;
  40.      gnsflag=CheckForNS(str);
  41.      sscanf(str,"%d",&stat);
  42.  }
  43.  
  44.  sprintf(GSTR1,"%sBulletins/Bull%d",Screen_Location,stat);
  45.  if(!(stat2=ChecktoDisplay(GSTR1,GSTR3,0,1))) {
  46.      sprintf(str,"\r\nSorry there is no bulletin #%d\r\n\r\n",stat);
  47.      AEPutStr(str);
  48.  }
  49.  if(bflag2)  goto InputAgain;
  50.  return(SUCCESS);
  51. }
  52.  
  53.